<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>7_文本溢出替换为省略号</title>
    <style>
        div {
            background-color: #ff0;
            /* 必须设置所在区域的大小*/
            width: 200px;
            /* 组合生效 文字溢出替换*/
            white-space: nowrap;/* 不运行换行*/
            overflow: hidden;/* 溢出隐藏*/
            text-overflow: ellipsis;/* 设置溢出文字替换为省略号*/
        }

    </style>
</head>
<body>
<div>
    Lorem ipsum dolor sit amet, consectetur adipisicing elit. At aut consequuntur cupiditate delectus dignissimos distinctio ea earum excepturi inventore ipsam porro, quas quasi quis quod reprehenderit similique ut, voluptate voluptatibus.
</div>
</body>
</html>